package com.zucai365.football.bean;

import com.wcj.common.bean.WcjBean;
import com.zucai365.football.utils.ZuCaiUtils;

// default package

/**
 * FootballPlayer entity. @author MyEclipse Persistence Tools
 */

public class TeamPlayerBean extends WcjBean {

	private static final long serialVersionUID = -458593163578658697L;

	private FootballPlayerBean footballPlayer;
	private LianSaiYearBean liansaiYear;
	private LianSaiBean liansai;
	private FootballTeamBean footballTeam;

	private String playerName;
	private int jerseyNumber;
	private String footballTeamName;

	private String position;
	private Short mainPlayer;
	private Short status;
	private Short playerBodyStatus;
	private String playerUrl;

	public TeamPlayerBean() {
	}

	public FootballPlayerBean getFootballPlayer() {
		return footballPlayer;
	}

	public void setFootballPlayer(FootballPlayerBean footballPlayer) {
		this.footballPlayer = footballPlayer;
	}

	public LianSaiYearBean getLiansaiYear() {
		return liansaiYear;
	}

	public void setLiansaiYear(LianSaiYearBean liansaiYear) {
		this.liansaiYear = liansaiYear;
	}

	public LianSaiBean getLiansai() {
		return liansai;
	}

	public void setLiansai(LianSaiBean liansai) {
		this.liansai = liansai;
	}

	public FootballTeamBean getFootballTeam() {
		return footballTeam;
	}

	public void setFootballTeam(FootballTeamBean footballTeam) {
		this.footballTeam = footballTeam;
	}

	public String getPlayerName() {
		return playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	public int getJerseyNumber() {
		return jerseyNumber;
	}

	public void setJerseyNumber( int jerseyNumber) {
		this.jerseyNumber = jerseyNumber;
	}

	public String getFootballTeamName() {
		return footballTeamName;
	}

	public void setFootballTeamName(String footballTeamName) {
		this.footballTeamName = footballTeamName;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public Short getMainPlayer() {
		//打到第几轮
		int lunci = ZuCaiUtils.getCurrentLunci( this.liansai.getId(), this.liansaiYear.getId() );
		int pjTime = (lunci*90)/2;
		//如果上场时间是总时间的一半，说明是主力
		if( this.playSumTime >= pjTime ){
			return 0; //主力
		}else{
			return 1; //替补
		}
		
	}

	public void setMainPlayer(Short mainPlayer) {
		this.mainPlayer = mainPlayer;
	}

	public Short getStatus() {
		return status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	public Short getPlayerBodyStatus() {
		return playerBodyStatus;
	}

	public void setPlayerBodyStatus(Short playerBodyStatus) {
		this.playerBodyStatus = playerBodyStatus;
	}

	public String getPlayerUrl() {
		return playerUrl;
	}

	public void setPlayerUrl(String playerUrl) {
		this.playerUrl = playerUrl;
	}
	
	private int playSumTime;

	public int getPlaySumTime() {
		return playSumTime;
	}

	public void setPlaySumTime(int playSumTime) {
		this.playSumTime = playSumTime;
	}
	
	private int sumJinQiu;
	private int zcJinQiu;
	private int kcJinQiu;

	public int getSumJinQiu() {
		return sumJinQiu;
	}

	public void setSumJinQiu(int sumJinQiu) {
		this.sumJinQiu = sumJinQiu;
	}

	public int getZcJinQiu() {
		return zcJinQiu;
	}

	public void setZcJinQiu(int zcJinQiu) {
		this.zcJinQiu = zcJinQiu;
	}

	public int getKcJinQiu() {
		return kcJinQiu;
	}

	public void setKcJinQiu(int kcJinQiu) {
		this.kcJinQiu = kcJinQiu;
	}
	
	private int sumHuang;
	private int sumHong;

	public int getSumHuang() {
		return sumHuang;
	}

	public void setSumHuang(int sumHuang) {
		this.sumHuang = sumHuang;
	}

	public int getSumHong() {
		return sumHong;
	}

	public void setSumHong(int sumHong) {
		this.sumHong = sumHong;
	}
	
	private String style;

	public String getStyle() {
		if( "前锋".equals( this.position ) ){
			return "color: red;";
		}
		if( "守门员".equals( this.position ) ){
			return "color: red;";
		}
		
//		if( "后卫".equals( this.position ) ){
//			return "color: a23451;";
//		}
		
//		if( "中场".equals( this.position ) ){
//			return "color: a23451;";
//		}
		return style;
	}

	public void setStyle(String style) {
		this.style = style;
	}
	
}